const _ = require('lodash')

const arr = [2, 1, 2]
const result = _.uniq(arr)
console.log(arr, result)

const objs = [{x: 1}, {x: 2}, {x: 1}]
const objResult = _.uniqBy(objs, 'x')
console.log(objs, objResult)
